package com.lyf.design.practice.theory.behavior.chain;

/**
 * @author LYF
 * @date 2022/6/22
 */
public class ChainHandler {
    public static void main(String[] args) {
        Handler bossHandler = new BossHandler();
        Handler hrHandler = new HrHandler();
        bossHandler.setName("Boss.Li");
        hrHandler.setName("Hr.Wang");
        hrHandler.setNextHandler(bossHandler);
        bossHandler.setNextHandler(null);

        hrHandler.handle(1000);

    }
}
